δ : an imperative object based calculus with delegation ?
نویسندگان
چکیده
Object based, imperative languages with delegation (eg SELF) support exploratory programming: composition of objects, sharing of attributes and modification of objects’ behaviour at run-time are easily expressible. Delegation allows objects to delegate execution of methods to other objects and to adapt delegated behaviour by overriding of method definitions. These features allow for creation of very flexible programs that can accomodate requirement changes at a very late stage. Programming language design and understanding has generally benefited from formal models of programming languages. Such models, of course, tend to focus on the essential features of the particular language, making it possible to highlighting design alternatives and compare them. Models for object based languages have already been developed in the 90’s [1, 7, 3], but these models do not directly express imperative delegation: In [1] delegation can only be encoded, while [7] is functional and its imperative derivative [3] does not accurately reflect the effect of change of a delegate. We argue that no calculi so far developed fully express the essence of such languages. We give a simple intuitive calculus for imperative object based delegation. We start with δ, an imperative object based calculus, and demonstrate its use through examples. δis similar to the first order imperative Abadi Cardelli calculus, though simpler in some sense. We prove a correspondence theorem. We then present δ, which extends δthrough explicit delegation; δ allows an object to specify explicitly to which objects it wants to delegate. We show key features of δ through examples.
منابع مشابه
Alias and Union Types for Delegation
We adapt the aliasing constraints approach for designing a flexible typing of evolving objects. Types are singleton types (addresses of objects, as a matter of fact) or finite “unions” of these. Their relevance is mainly due to the sort of safety property they guarantee. In particular we provide a type system for an imperative object based calculus with delegation and conditional expressions an...
متن کاملA Framework for Defining Object-Calculi
In this paper, we give a general framework for the foundation of an operational (small step) semantics of object-based languages with an emphasis on functional and imperative issues. The framework allows classifying very naturally many object-based calculi according to their main implementation techniques of inheritance, namely delegation and embedding, and their particular strategies. This dis...
متن کاملCan addresses be types? (A case study: objects with delegation)
We adapt the aliasing constraints approach for designing a flexible typing of evolving objects. Types are singleton types (addresses of objects, as a matter of fact) whose relevance is mainly due to the sort of safety property they guarantee. In particular we provide a type system for an imperative object based calculus with delegation and which supports method and delegate overriding, addition...
متن کاملAn Imperative, First-Order Calculus with Object Extension
This paper presents an imperative object calculus designed to support class-based programming via a combination of extensible objects and encapsulation. This calculus simplifies the language presented in [17] in that, like C++ and Java, it chooses to support an imperative semantics instead of method specialization. We show how Java-style classes and “mixins” may be coded in this calculus, prove...
متن کاملAn Imperative , First - Order Calculus withObject
This paper presents an imperative object calculus designed to support class-based programming via a combination of extensible objects and encapsulation. This calculus simpliies the language presented in 17] in that, like C++ and Java, it chooses to support an imperative semantics instead of method specialization. We show how Java-style classes and \mixins" may be coded in this calculus, prove a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003